#pragma once
#include "constant.h"
#include <ostream>
#include <vector>
#define CARD_NUM 13   //去除大小王后的数量，3,4,5,6,7,8,9,10,J,Q,K,A,2
#define SMALL_KING 13 //小王
#define BIG_KING 14   //大王
namespace dymy
{
        namespace card
        {
                typedef std::array<card_t, 54> AllCards_t;//一副排54张

                constexpr inline card_t encode_card(card_type_t type, card_num_t num) noexcept
                {
#ifdef CARD_RELAX_MODE
                        return num;
#else
                        return type | num;
#endif
                }

                constexpr inline card_type_t decode_card_type(card_t card) noexcept
                {
#ifdef CARD_RELAX_MODE
                        return UNKNOW;
#else
                        return card & ~MASK;
#endif
                }
                constexpr inline card_num_t decode_card_num(card_t card) noexcept
                {
#ifdef CARD_RELAX_MODE
                        return card;
#else
                        return card & MASK;
#endif
                }

                AllCards_t MakeAllCards();

        }

}
